//
//  UINaigationTabVC.m
//  UILbrary
//
//  Created by mac on 17/5/9.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "UINaigationTabVC.h"

@interface UINaigationTabVC ()
@property (nonatomic , strong) NSArray *vcArrays;
@end

@implementation UINaigationTabVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"];
}



#pragma mark - Table view data source


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

    return self.vcArrays.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
    cell.textLabel.text = self.vcArrays[0][1];
    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
     UIViewController *vc  = [(UIViewController *)[NSClassFromString(self.vcArrays[0][0]) alloc] init];
    vc.title = self.vcArrays[0][1];
    [self.navigationController pushViewController:vc animated:YES];
}

- (NSArray *)vcArrays{
    return @[@[@"UINavigationStatusBarVC",@"状态栏 背景颜色"]];
}
@end
